import bus from "@/bus";
let data = {
	totalItem: 1,
	pageSize: window.$pageSize,
  currentPage: 1,
  form: {
    code: '',
    keyword: '',
    categoryId: null,
    brandId: null
  },
  columns: [{
		title: '选择',
		width: 50,
    align: 'left',
    render: (h, params) => {
      return h('div', [
        h('Radio', {
          props: {
            value: params.row.isShow
          },
          on: {
            'on-change': (e) => {
              params.row.isShow = e
              bus.$emit('onRadio', {index: params.index, row:params.row})
            }
          }
        })
      ])
    }
	}, {
    title: '编码',
    align: 'left',
    key: 'code',
    width: 150
  }, {
    title: '名称',
    key: 'title',
    minWidth: 100
  }, {
    title: '品牌',
    key: 'brandName',
    align: 'left'
  }, {
    title: '单位',
    key: 'unit',
    align: 'left',
    width: 80
  }, {
    title: '已绑数量',
    key: 'materialBinds',
    align: 'left',
    width: 80
  }, {
    title: '分类',
    key: 'categoryName',
    align: 'left'
  }, {
    title: '状态',
    minWidth: 80,
    align: 'left',
    key: 'isShelf',
    render: (h, params) => {
      let text = params.row.isShelf ? '已上架' : '未上架';
      let className = params.row.isShelf ? 'font-red' : 'font-blue';
      return h('div', {
        class: className
      }, text)
    }
  }, {
    title: '品牌商',
    align: 'left',
    key: 'ownerName',
    width: 150
  }],
  data: []
}
export default data